package com.syp.auth.domain.enums;

/**
 * 资源作为首页
 * @author syp
 *
 */
public enum ResourceIsDefaultEnum {

	TRUE(1, "是"), FALSE(0, "否");

	private Integer code;
	private String desc;

	private ResourceIsDefaultEnum(Integer code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public Integer getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
	
	public static ResourceIsDefaultEnum getEnum(Integer code){
		for(ResourceIsDefaultEnum rs : ResourceIsDefaultEnum.values()){
			if(rs.getCode() == code){
				return rs;
			}
		}
		return null;
	}

}